-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/pg command #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
507ef6b to
770623b
Compare
| kind = data["kind"] || "" | ||
|
|
||
| unless kind == "Postgres" || @nctl.dry_run | ||
| Output.error("Backups can only be downloaded for PostgreSQL databases. (shared dbs are not supported)") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not supported yet afaik
coorasse
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Amazing! One of the most useful features!!!
In all the other commands we use --app to define the app, shouldn't we follow the same pattern here? Otherwise it might be confusing.
deploio pg backups download --app APP_NAME.
this would download the backup of the DATABASE_URL of the app by default, otherise we could specify the --db?
I want to hear your opinion
| def get_all_pg_databases | ||
| output_dedicated_dbs = capture("get", "postgres", "-A", "-o", "json") | ||
| output_shared_dbs = capture("get", "postgresdatabase", "-A", "-o", "json") | ||
| if (output_dedicated_dbs.nil? || output_dedicated_dbs.empty?) && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if (output_dedicated_dbs.nil? || output_dedicated_dbs.empty?) && | |
| if output_dedicated_dbs.empty? && |
if it's nil, .empty? returns true already, no?
|
Thanks for the inputs @coorasse. I like the idea that you don't have to specify the database but rather an app. Coming to |
I wanted to have a unified CLI that manages dedicated and shared databases and provides an interface to get backups so I can use them locally
Screenshot.on.2026-02-04.at.17.11.mp4
I followed the same scheme of having -. Sadly, this leads to some weird names when we had the project name repeated in the database name